package com.engr.springbooteasypoi.util;

/**
 * @author : liuYanXin
 * @Description :
 * @Date : 2020-04-03
 */
public class HttpTest {

    private final static String APP_ID = "your app_id";
    private final static String APP_SECERT = "your app_secert";
    private final static String AUTH_CODE = "your auth_code";

    public static void main(String[] args) {

        /**
         * 多余参数可以使用treeMap,然后把map转成字符串
         */
        String signStr = "appId" + APP_ID + "&auth_code" + AUTH_CODE + "&time_stamp" + System.currentTimeMillis() / 1000;

        /**
         * 把上述参数进行MD5加密
         */
        String md5Str = "MD5 str";

        /**
         * 把MD5 字符串返回过来的大写
         */
        String MD5STR = md5Str.toUpperCase();
        /**
         * 拼接所有参数
         */
        String reqStr = "appId" + APP_ID + "&auth_code" + AUTH_CODE + "&time_stamp" + System.currentTimeMillis() / 1000
                + "&sign_str" + MD5STR + "&app_secert" + APP_SECERT;

        /**
         * 再用HTTP调用
         */
    }
}
